<div class="submaterial-manage">
    <div nz-row nzGutter="10" class="row_2">
        <div nz-col nzSpan="4">
            <!-- <label style="width: 15%;">物料编码：</label>
            <input nz-input placeholder="输入物料编码" [(ngModel)]="searchCode" appHotSearch
                (hotSearchEmit)="GetSearchPageList()" style="width: 60%;" /> -->
                <label style="width: 15%;">物料编码：</label>
            <input nz-input placeholder="输入物料编码" [(ngModel)]="searchCode" appHotSearch
                (hotSearchEmit)="GetSearchPageList()"  style="width: 60%;"/>
        </div>
        <div nz-col nzSpan="4" >
            <!-- <label style="width: 15%;">物料名称：</label>
            <input nz-input placeholder="输入物料名称" [(ngModel)]="searchName" appHotSearch
                (hotSearchEmit)="GetSearchPageList()" style="width: 60%;" /> -->

                <label style="width: 15%;">物料名称：</label>
                <input nz-input placeholder="输入物料名称" [(ngModel)]="searchName" appHotSearch
                    (hotSearchEmit)="GetSearchPageList()" style="width: 60%;"/>
        </div>
        <div nz-col nzSpan="5" style="text-align: right;">
            <label style="width: 20%;">是否抽秤:</label>
            <nz-select style="width: 60%;" nzDropdownClassName="select_custom" nz-col [(ngModel)]="isZc" nzPlaceHolder="是否抽秤" (ngModelChange)="selectedZc($event)">
                <nz-option nzValue="" nzLabel="请选择"></nz-option>
                <nz-option nzValue="true" nzLabel="是"></nz-option>
                <nz-option nzValue="false" nzLabel="否"></nz-option>
            </nz-select>
        </div>
        <div nz-col nzSpan="5" style="text-align: right;">
            <label style="width: 20%;">是否批次:</label>
            <nz-select style="width: 60%;" nzDropdownClassName="select_custom" nz-col [(ngModel)]="isPc" nzPlaceHolder="是否批次" (ngModelChange)="selectedPc($event)">
                <nz-option nzValue="" nzLabel="请选择"></nz-option>
                <nz-option nzValue="true" nzLabel="是"></nz-option>
                <nz-option nzValue="false" nzLabel="否"></nz-option>
            </nz-select>
        </div>
        <div nz-col nzSpan="5" style="text-align: right;">
            <label style="width: 20%;">是否检验:</label>
            <nz-select style="width: 60%;" nzDropdownClassName="select_custom" nz-col [(ngModel)]="isJy" nzPlaceHolder="是否检验" (ngModelChange)="selectedJy($event)">
                <nz-option nzValue="" nzLabel="请选择"></nz-option>
                <nz-option nzValue="true" nzLabel="是"></nz-option>
                <nz-option nzValue="false" nzLabel="否"></nz-option>
            </nz-select>
        </div>
    </div>
    <div nz-row nzGutter="10" class="row_2">
        <div nzSpan="15" nz-col class="operate_btn">
            <button nz-button nzType="primary" (click)="showModal(1,false)" *ngIf="bornRoles.add"><i nz-icon
                    nzType="plus"></i>新增</button>
            <button nz-button nzType="" (click)="showModal(2,'')" [disabled]="editDisabled"
                [class]="editDisabled?'ant-btn ant-btn-primary disabledBg':'ant-btn ant-btn-primary'"
                *ngIf="bornRoles.edit"><i nz-icon nzType="edit"></i>修改</button>
            <button nz-button nzType="" [disabled]="deleteDisabled" (click)="handleDelete()"
                [class]="deleteDisabled?'ant-btn ant-btn-primary disabledBg':'ant-btn ant-btn-primary'"
                *ngIf="bornRoles.del"><i nz-icon nzType="delete"></i>启用/禁用</button>
            <button nz-button nzType="" (click)="downloadList()" [nzLoading]="isLoading"><i nz-icon nzType="download"></i>获取ERP数据</button>
        </div>
        <!-- <div nz-col nzSpan="2"></div> -->
        <!-- <div nz-col nzSpan="4" class="operate_Search_btn">
            <button nz-button nzType="" (click)="handleSearch()">
                <i nz-icon nzType="search"></i>搜索
            </button>
        </div> -->
    </div>
    <div nz-row class="row_2">
        <nz-table #expandTable [nzData]="listOfMapData" nzSize="small" [nzFrontPagination]="false" [nzBordered]="true" nzTitle="物料列表">
            <!-- <nz-table #expandTable [nzData]="listOfMapData" [nzFrontPagination]="false"
            (nzCurrentPageDataChange)="currentPageDataChange($event)"> -->
            <thead>
                <tr>
                    <th nzShowCheckbox [(nzChecked)]="isAllDisplayDataChecked" [nzIndeterminate]="isIndeterminate"
                        (nzCheckedChange)="checkAll($event)"></th>
                    <th>物料编码</th>
                    <th>物料名称
                    </th>
                    <th>单位</th>
                    <th>分类</th>
                    <th>物料标准价
                    </th>
                    <th>标准成本
                    </th>
                    <!-- <th>有效月数
                    </th> -->
                    <th>有效天数
                    </th>
                    <th nzWidth="60px">是否批次
                    </th>
                    <th nzWidth="60px">是否检验
                    </th>
                    <th>检验时间（天）
                    </th>
                    <th nzWidth="60px">是否抽秤
                    </th>
                    <th>抽秤比率(%)
                    </th>
                    <th>ABC分类
                    </th>
                    <!-- <th>备注
                    </th> -->
                    <th nzWidth="60px"> 是否启用
                    </th>
                    <th>更新时间
                    </th>
                    <th>操作
                    </th>
                </tr>
            </thead>
            <tbody>
                <!-- <tr *ngFor="let data of expandTable.data" (click)="GetSpecList(data.id)" 
                [class]="data.id===materialId?'tbodyData ant-table-row ng-star-inserted trClick':'tbodyData ant-table-row ng-star-inserted'" > -->
                <tr *ngFor="let data of expandTable.data" [class]="materialId==data.id?'tbodyData ant-table-row ng-star-inserted active':'tbodyData ant-table-row ng-star-inserted'" (click)="GetSpecList(data.id)">
                    <td nzShowCheckbox [(nzChecked)]="data.checked" [nzDisabled]="data.disabled"
                        (nzCheckedChange)="refreshStatus(data)">
                    </td>
                    <td style="display: none;">{{ data.id }}</td>
                    <td>{{ data.code }}</td>
                    <td>{{ data.name }}</td>
                    <td>{{ data.unit }}</td>
                    <td>{{ data.category }}</td>
                    <td>{{ data.price }}</td>
                    <td>{{ data.costPrice }}</td>
                    <!-- <td>{{ data.validMonth }}</td> -->
                    <td>{{ data.validDay }}</td>
                    <td>{{ data.isBatch?'是':'否'  }}</td>
                    <td>{{ data.isCheck?'是':'否'  }}</td>
                    <td>{{ data.checkDays }}</td>
                    <td>{{ data.isWeight?'是':'否'  }}</td>
                    <td>{{ data.weightRate }}</td>
                    <td>{{ data.abc }}</td>
                    <!-- <td>{{ data.remarks }}</td> -->
                    <td>{{ data.enabled?'是':'否'  }}</td>
                    <td>{{ data.updateDate }}</td>
                    <td>
                        <!-- <button (click)="showModal(2,data)" nz-button nzType="primary" style="margin-right: 4px;"><i
                                nz-icon nzType="edit"></i></button>
                        <button nz-button nzType="danger" style="margin-right: 4px;"
                            (click)="handleDelete([data.id])"><i nz-icon nzType="delete"></i></button> -->
                        <button nz-button nzType="dashed" style="margin-right: 4px;" (click)="GetModel(data)"><i nz-icon
                                nzType="profile"></i></button>

                        <!-- <a href="javascript:void(0);" (click)="GetSpecList(data.id)" nz-button nzType="default"
                            style="margin-right: 4px;margin-top:4px" [class]="materialId==data.id?'ant-btn ant-btn-default ant-btn-icon-only active':'ant-btn ant-btn-default ant-btn-icon-only'" ><i nz-icon nzType="eye"></i></a> -->

                        <!-- <button (click)="GetSpecList(data.id,'#distannce1')" nz-button nzType="default"
                            style="margin-right: 4px;"><i nz-icon nzType="eye"></i></button> -->
                    </td>
                </tr>
            </tbody>
        </nz-table>
        <div nz-row class="row_4" *ngIf="expandTable.data.length!=0">
            <nz-pagination (nzPageIndexChange)="clickPage($event)" (nzPageSizeChange)="clickSize($event)"
                [(nzPageIndex)]="pageIndex" [nzTotal]="totalSize" [nzShowTotal]="totalTemplate"></nz-pagination>
            <ng-template #totalTemplate let-total> 总共 {{totalSize}} 条 </ng-template>
        </div>
    </div>
    <div nz-row class="line_row"></div>
    <div nz-row class="row_2" id="distannce1">
        <div nz-row class="operate_btn">
            <button nz-button nzType="primary" (click)="SpecAdd()" [disabled]="SpecAddDisabled"
                [class]="SpecAddDisabled?'ant-btn ant-btn-primary disabledBg':'ant-btn ant-btn-primary'"
                *ngIf="bornRolesSepc.add"><i nz-icon nzType="plus"></i>新增</button>
            <button nz-button nzType="" (click)="SpecEdit()"
                [class]="SpecEditDisabled?'ant-btn ant-btn-primary disabledBg':'ant-btn ant-btn-primary'"
                [disabled]="SpecEditDisabled" *ngIf="bornRolesSepc.edit"><i nz-icon nzType="edit"></i>修改</button>
            <button nz-button nzType="" [disabled]="SpecDeleteDisabled"
                [class]="SpecDeleteDisabled?'ant-btn ant-btn-primary disabledBg':'ant-btn ant-btn-primary'"
                (click)="SpecDelete()" *ngIf="bornRolesSepc.del"><i nz-icon nzType="delete"></i>删除</button>
        </div>
        <div nz-col nzSpan="17" class="col_1">
            <nz-table class="list_table" #basicTable [nzFrontPagination]="false" #expandTableItem
                [nzData]="bottomListOfData" [nzBordered]="true" nzTitle="物料规格" nzSize="small">
                <thead>
                    <tr>
                        <th nzShowCheckbox [(nzChecked)]="SpecIsAllChecked" [nzIndeterminate]="isIndeterminate"
                            (nzCheckedChange)="checkSpecAll($event)"></th>
                        <th>包装规格(公斤/每包)</th>
                        <th>大小包装</th>
                        <th>默认投料仓</th>
                    </tr>
                </thead>
                <tbody>
                    <tr *ngFor="let dataItem of expandTableItem.data">
                        <td style="display: none;">{{ dataItem.id }}</td>
                        <td nzShowCheckbox [(nzChecked)]="dataItem.checked" (nzCheckedChange)="SpecStatus()">
                        <td>{{ dataItem.spec }}</td>
                        <td>{{ dataItem.packSize }}</td>
                        <td>{{ dataItem.warehouseAreaName }}</td>
                    </tr>
                </tbody>
            </nz-table>
        </div>

        <div nz-col nzSpan="6" class="col_2">
            <nz-table #basicTable [nzFrontPagination]="false" #expandTableItemKf [nzData]="StorageRoomAreaList"
                [nzBordered]="true" style="border:none !important;" nzTitle="物料库房库区" nzSize="small">
                <thead>
                    <tr>
                        <th>库房
                        </th>
                        <th>库区</th>
                    </tr>
                </thead>
                <tbody>
                    <tr *ngFor="let dataKf of expandTableItemKf.data">
                        <td>{{ dataKf.warehouseName }}</td>
                        <td>{{ dataKf.warehouseAreaName }}</td>
                    </tr>
                </tbody>
            </nz-table>
        </div>
    </div>
</div>
<div id="modal_box"></div>
<nz-modal appDragModal [nzStyle]="{left:'28%',top:'18%'}" [(nzVisible)]="isVisible" [nzGetContainer]="modalDomBox" [nzTitle]="modelType==1?'新增':'编辑'" (nzOnCancel)="handleCancel()" [nzFooter]="null"
    class="hmodal" nzWidth="55%" nzMaskClosable="false">

    <form nz-form [formGroup]="subSavementForm" (ngSubmit)="handleOk()">

        <div nz-row class="model_container">
            <!-- <fieldset> -->
            <nz-divider nzText="基本信息" nzOrientation="left" style="margin: 0px;"></nz-divider>
            <!-- <legend>基本信息</legend> -->
            <div nz-col nzSpan="24">
                <div nz-col nzSpan="8">
                    <nz-form-item>
                        <nz-form-label [nzSpan]="9" nzRequired>物料编码</nz-form-label>
                        <nz-form-control [nzSpan]="12" nzErrorTip="请输入物料编码">
                            <input nz-input formControlName="code" placeholder="请输入物料编码" />
                        </nz-form-control>
                    </nz-form-item>
                </div>
                <div nz-col nzSpan="8">
                    <nz-form-item>
                        <nz-form-label [nzSpan]="10" nzRequired>物料名称</nz-form-label>
                        <nz-form-control [nzSpan]="12" nzErrorTip="请输入物料名称">
                            <input nz-input formControlName="name" placeholder="请输入物料名称" />
                        </nz-form-control>
                    </nz-form-item>
                </div>
                <div nz-col nzSpan="8">
                    <nz-form-item>
                        <nz-form-label [nzSpan]="10" nzRequired>单位</nz-form-label>
                        <nz-form-control [nzSpan]="12" nzErrorTip="请输入单位">
                            <input nz-input formControlName="unit" placeholder="请输入单位" />
                        </nz-form-control>
                    </nz-form-item>
                </div>
            </div>
            <div nz-col nzSpan="24">
                <div nz-col nzSpan="8">
                    <nz-form-item>
                        <nz-form-label [nzSpan]="9" nzRequired>分类</nz-form-label>
                        <nz-form-control [nzSpan]="12" nzErrorTip="请选择分类">
                            <nz-select nzDropdownClassName="select_custom" class="select_term" formControlName="category"
                                (ngModelChange)="selectedCLModal($event)">
                                <nz-option nzValue="" nzLabel="请选择"></nz-option>
                                <nz-option *ngFor="let item of clList" [nzValue]="item.value" [nzLabel]="item.label">
                                </nz-option>
                            </nz-select>
                        </nz-form-control>
                    </nz-form-item>
                </div>
                <div nz-col nzSpan="8">
                    <nz-form-item>
                        <nz-form-label [nzSpan]="10" nzRequired>物料标准价</nz-form-label>
                        <nz-form-control [nzSpan]="12" nzErrorTip="请输入物料标准价">
                            <nz-input-number formControlName="price" [nzMin]="0"  [nzStep]="1"
                                placeholder="请输入物料标准价"></nz-input-number>
                        </nz-form-control>
                    </nz-form-item>
                </div>
                <div nz-col nzSpan="8">
                    <nz-form-item>
                        <nz-form-label [nzSpan]="10" nzRequired>标准成本</nz-form-label>
                        <nz-form-control [nzSpan]="12" nzErrorTip="请输入标准成本">
                            <nz-input-number formControlName="costPrice" [(ngModel)]="costPrice" [nzMin]="0"
                                 [nzStep]="1" placeholder="请输入标准成本"></nz-input-number>
                        </nz-form-control>
                    </nz-form-item>
                </div>
            </div>
            <div nz-col nzSpan="24">
                <!-- <div nz-col nzSpan="8">
                    <nz-form-item>
                        <nz-form-label [nzSpan]="9" nzRequired>有效月数</nz-form-label>
                        <nz-form-control [nzSpan]="12" nzErrorTip="请输入有效月数">
                            <nz-input-number formControlName="validMonth" [nzMin]="0" [nzMax]="100" [nzStep]="1"
                                placeholder="请输入有效月数"></nz-input-number>
                        </nz-form-control>
                    </nz-form-item>
                </div> -->
                <div nz-col nzSpan="8">
                    <nz-form-item>
                        <nz-form-label [nzSpan]="9">有效期</nz-form-label>
                        <nz-form-control [nzSpan]="15">
                            <input nz-input type="number" max="100" min="1" formControlName="validDay"
                                style="width:80%" (ngModelChange)="validDayChange($event)" />
                        </nz-form-control>
                    </nz-form-item>
                </div>
                <div nz-col nzSpan="2" style="margin-left: -30px;">
                    <nz-form-item>
                        <nz-form-control [nzSpan]="24">
                            <nz-select (ngModelChange)="dateChange($event)" formControlName="modalSelDate" nzDropdownClassName="select_custom">
                                <nz-option *ngFor="let item of modalSelDateList" [nzValue]="item.value" [nzLabel]="item.label"></nz-option>
                            </nz-select>
                        </nz-form-control>
                    </nz-form-item>
                </div>
                <div nz-col nzSpan="2" style="margin-left:10px">
                    <nz-form-item>
                        <nz-form-control [nzSpan]="24">
                            <input nz-input formControlName="totalDate" disabled/>
                        </nz-form-control>
                    </nz-form-item>
                </div>
                <div nz-col nzSpan="24" style="margin-bottom:5px">
                    <nz-form-label [nzSpan]="3">备注</nz-form-label>
                    <nz-form-control [nzSpan]="21">
                        <textarea nz-input [nzAutosize]="{ minRows: 3, maxRows: 6 }" maxlength="200"
                            formControlName="remarks"></textarea>
                    </nz-form-control>
                </div>
                <!-- <div nz-col nzSpan="8">
                    <nz-form-item>
                        <nz-form-label [nzSpan]="10" nzRequired>指定采购人</nz-form-label>
                        <nz-form-control [nzSpan]="12" nzErrorTip="请输入指定采购人">
                            <input nz-input formControlName="purchaser" placeholder="请输入指定采购人" />
                        </nz-form-control>
                    </nz-form-item>
                </div> -->
            </div>
            <div class="clear"></div>
            <div nz-row class="tab-height">
                <nz-tabset>
                    <nz-tab nzTitle="原料属性">
                        <div nz-col nzSpan="24" class="hrDiv">
                            <div nz-col nzSpan="8">
                                <nz-form-item nz-row class="register-area">
                                    <nz-form-label [nzSpan]="9">是否批次</nz-form-label>
                                    <nz-form-control [nzSpan]="12">
                                        <label nz-checkbox formControlName="isBatch">
                                        </label>
                                    </nz-form-control>
                                </nz-form-item>
                            </div>
                            <div nz-col nzSpan="8">
                                <nz-form-item>
                                    <nz-form-label [nzSpan]="10">是否检验</nz-form-label>
                                    <nz-form-control [nzSpan]="12">
                                        <label nz-checkbox formControlName="isCheck" (ngModelChange)="requiredJyChange($event)">
                                        </label>
                                    </nz-form-control>
                                </nz-form-item>
                            </div>
                            <div nz-col nzSpan="8">
                                <nz-form-item>
                                    <nz-form-label [nzSpan]="10">是否抽秤</nz-form-label>
                                    <nz-form-control [nzSpan]="12">
                                        <label nz-checkbox formControlName="isWeight"
                                            (ngModelChange)="requiredWeightChange($event)">
                                        </label>
                                    </nz-form-control>
                                </nz-form-item>
                            </div>
                        </div>
                        <div nz-col nzSpan="24" style="margin-bottom:20px">
                            <div nz-col nzSpan="8">
                                <nz-form-item>
                                    <nz-form-label [nzSpan]="9" [nzRequired]="subSavementForm.get('isCheck')?.value">检验天数
                                    </nz-form-label>
                                    <nz-form-control [nzSpan]="12" nzErrorTip="请输入检验天数">
                                        <nz-input-number formControlName="checkDays" [nzMin]="0" [nzMax]="100" [nzStep]="1"
                                            placeholder="请输入检验天数"></nz-input-number>
                                    </nz-form-control>
                                </nz-form-item>
                            </div>
                            <div nz-col nzSpan="8">
                                <nz-form-item>
                                    <nz-form-label [nzSpan]="10" [nzRequired]="subSavementForm.get('isWeight')?.value">抽秤比率
                                    </nz-form-label>
                                    <nz-form-control [nzSpan]="12" nzErrorTip="请输入抽秤比率">
                                        <!-- <nz-input-number formControlName="weightRate" [nzMin]="0"
                                                [nzMax]="100" [nzStep]="1" [nzFormatter]="formatterPercent"
                                                [nzParser]="parserPercent">
                                            </nz-input-number> -->
                                        <nz-input-number formControlName="weightRate" [nzMin]="0" [nzMax]="100" [nzStep]="1"
                                            placeholder="请输入抽秤比率"></nz-input-number>&nbsp;%
            
                                    </nz-form-control>
                                </nz-form-item>
                            </div>
                            <div nz-col nzSpan="8">
                                <nz-form-item>
                                    <nz-form-label [nzSpan]="10">ABC分类</nz-form-label>
                                    <nz-form-control [nzSpan]="12" nzErrorTip="ABC分类">
                                        <nz-select nzDropdownClassName="select_custom" class="select_term" formControlName="abc"
                                            (ngModelChange)="selectedCLAbcModal($event)">
                                            <nz-option nzValue="" nzLabel="请选择"></nz-option>
                                            <nz-option *ngFor="let item of clListAbc" [nzValue]="item.value" [nzLabel]="item.label">
                                            </nz-option>
                                        </nz-select>
                                    </nz-form-control>
                                </nz-form-item>
                            </div>
                        </div>
                    </nz-tab>
                    <nz-tab nzTitle="产品属性">
                        <div id="region">
                            <div nz-col nzSpan="24">
                                <div nz-col nzSpan="8">
                                    <nz-form-item>
                                        <nz-form-label [nzSpan]="9">色序号</nz-form-label>
                                        <nz-form-control [nzSpan]="12" nzErrorTip="请输入色序号">
                                            <input nz-input formControlName="csn" placeholder="请输入色序号" />
                                        </nz-form-control>
                                    </nz-form-item>
                                </div>
                              
                                <div nz-col nzSpan="8">
                                    <nz-form-item>
                                        <nz-form-label [nzSpan]="10">产品标准代号</nz-form-label>
                                        <nz-form-control [nzSpan]="12">
                                            <input nz-input formControlName="psc" placeholder="请输入产品标准代号" />
                                        </nz-form-control>
                                    </nz-form-item>
                                </div>
                            </div>
                        </div>
                        
                    </nz-tab>
                </nz-tabset>
            </div>
            <!-- </fieldset> -->
            <!-- <nz-divider></nz-divider> -->
            <!-- <fieldset>
                <legend></legend> -->
            <!-- </fieldset> -->
        </div>
        <div nz-row class="custome_modal_footer">
            <div nz-col nzSpan="24" style="text-align: right;">
                <button nz-button type="button" nzType="default" (click)="handleCancel()">取消</button>
                <button nz-button nzType="primary" [nzLoading]="isOkLoading">确定</button>
            </div>
        </div>
    </form>
</nz-modal>
<div id="modal_boxGg"></div>
<nz-modal appDragModal [(nzVisible)]="isViewWin" [nzGetContainer]="modalDomBoxGg" [nzTitle]="specIsAdd?'新增':'编辑'" (nzOnCancel)="SpecCancel()" [nzFooter]="null"
    class="hmodal" nzMaskClosable="false">
    <form nz-form [formGroup]="SpecForm" (ngSubmit)="SpecSubmit()">
        <nz-form-item>
            <nz-form-label [nzSpan]="5" nzRequired>包装规格</nz-form-label>
            <nz-form-control [nzSpan]="15" nzErrorTip="请输入包装规格" style="width: 200px;">
                <input nz-input formControlName="AddSpec" placeholder="请输入包装规格"  />
              
                <!-- <nz-input-number formControlName="AddSpec" [nzMin]="1" [nzMax]="100" style="width: 100%;" nzPlaceHolder="请输入包装规格" ></nz-input-number> -->
            </nz-form-control>
            <label style="height: 40px; line-height: 40px; margin-left: 5px;">公斤/每包</label>
        </nz-form-item>
        <nz-form-item>
            <nz-form-label [nzSpan]="5" nzRequired>大小包装</nz-form-label>
            <nz-form-control [nzSpan]="15" nzErrorTip="请输入大小包装">
                <!-- <input nz-input formControlName="AddPackSize" placeholder="请输入大小包装" /> -->
                <!-- <nz-input-number formControlName="AddPackSize" [nzMin]="1" [nzMax]="100" style="width: 100%;" nzPlaceHolder="请输入大小包装" ></nz-input-number> -->
                <nz-select nzDropdownClassName="select_custom" class="select_term" formControlName="AddPackSize">
                            <nz-option nzValue="" nzLabel="请选择"></nz-option>
                            <nz-option nzValue="1" nzLabel="大包装"></nz-option>
                            <nz-option nzValue="2" nzLabel="小包装"></nz-option>
                            <nz-option nzValue="3" nzLabel="非标准"></nz-option>
                        </nz-select>
            </nz-form-control>
        </nz-form-item>
        <div nz-row [nzGutter]="16">
            <div nz-col nzSpan="12">
                <nz-form-item>
                    <nz-form-label [nzSpan]="10" nzRequired>默认投料仓</nz-form-label>
                    <nz-form-control [nzSpan]="14" nzErrorTip="请选择库房">
                        <nz-select nzDropdownClassName="select_custom" class="select_term" formControlName="wareId"
                            (ngModelChange)="selectedWareModal($event)">
                            <nz-option nzValue="" nzLabel="请选择"></nz-option>
                            <nz-option *ngFor="let item of wareList" [nzValue]="item.id" [nzLabel]="item.name">
                            </nz-option>
                        </nz-select>
                    </nz-form-control>
                </nz-form-item>
            </div>
            <div nz-col nzSpan="10">
                <nz-form-item>
                    <!-- <nz-form-label [nzSpan]="1"></nz-form-label> -->
                    <nz-form-control nzErrorTip="请选择库区" [nzXs]="{ span: 10, offset: 0 }"
                        [nzSm]="{ span: 14, offset: 4 }">
                        <nz-select nzDropdownClassName="select_custom" class="select_term" formControlName="areaId">
                            <nz-option nzValue="" nzLabel="请选择"></nz-option>
                            <nz-option *ngFor="let item of areaList" [nzValue]="item.id" [nzLabel]="item.name">
                            </nz-option>
                        </nz-select>
                    </nz-form-control>
                </nz-form-item>
            </div>
        </div>
        <div nz-row class="custome_modal_footer">
            <div nz-col nzSpan="24" style="text-align: right;">
                <button nz-button type="button" nzType="default" (click)="SpecCancel()">取消</button>
                <button nz-button nzType="primary" [nzLoading]="SpecisOkLoading">确定</button>
            </div>
        </div>
    </form>
</nz-modal>
<div id="modal_box_info"></div>
<nz-modal appDragModal [nzStyle]="{left:'28%',top:'18%'}" [(nzVisible)]="isView"  [nzGetContainer]="modalDomBoxInfo" nzTitle="详情" (nzOnCancel)="ViewCancel()" [nzFooter]="null" class="hmodal"
    nzWidth="55%" nzMaskClosable="false">
    <form nz-form [formGroup]="subSavementForm">
        <div nz-row class="model_container">
            <!-- <fieldset>
                <legend>基本信息</legend> -->
            <nz-divider nzText="基本信息" nzOrientation="left" style="margin: 0px;"></nz-divider>
            <div nz-col nzSpan="24" class="hrDiv">
                <div nz-col nzSpan="8" style="height: 20px;">
                    <nz-form-item>
                        <nz-form-label [nzSpan]="9">物料编码</nz-form-label>
                        <nz-form-control [nzSpan]="12" nzErrorTip="请输入物料编码">
                            <span>{{ViewData.code}}</span>
                        </nz-form-control>
                    </nz-form-item>
                </div>
                <div nz-col nzSpan="8">
                    <nz-form-item>
                        <nz-form-label [nzSpan]="10">物料名称</nz-form-label>
                        <nz-form-control [nzSpan]="12" nzErrorTip="请输入物料名称">
                            <span>{{ViewData.name}}</span>
                        </nz-form-control>
                    </nz-form-item>
                </div>
                <div nz-col nzSpan="8">
                    <nz-form-item>
                        <nz-form-label [nzSpan]="10">单位</nz-form-label>
                        <nz-form-control [nzSpan]="12" nzErrorTip="请输入单位">
                            <span>{{ViewData.unit}}</span>
                        </nz-form-control>
                    </nz-form-item>
                </div>
            </div>
            <div nz-col nzSpan="24" class="hrDiv">
                <div nz-col nzSpan="8">
                    <nz-form-item>
                        <nz-form-label [nzSpan]="9">分类</nz-form-label>
                        <nz-form-control [nzSpan]="12" nzErrorTip="请选择分类">
                            <span>{{ViewData.category}}</span>
                        </nz-form-control>
                    </nz-form-item>
                </div>
                <div nz-col nzSpan="8">
                    <nz-form-item>
                        <nz-form-label [nzSpan]="10">物料标准价</nz-form-label>
                        <nz-form-control [nzSpan]="12" nzErrorTip="请输入物料标准价">
                            <span>{{ViewData.price}}</span>
                        </nz-form-control>
                    </nz-form-item>
                </div>
                <div nz-col nzSpan="8">
                    <nz-form-item>
                        <nz-form-label [nzSpan]="10">标准成本</nz-form-label>
                        <nz-form-control [nzSpan]="12" nzErrorTip="请输入标准成本">
                            <span>{{ViewData.costPrice}}</span>
                        </nz-form-control>
                    </nz-form-item>
                </div>
            </div>
            <div nz-col nzSpan="24" class="hrDiv">
                <div nz-col nzSpan="8">
                    <nz-form-item>
                        <nz-form-label [nzSpan]="9">有效天数</nz-form-label>
                        <nz-form-control [nzSpan]="12" nzErrorTip="请输入有效月数">
                            <span>{{ViewData.validDay}}</span>
                        </nz-form-control>
                    </nz-form-item>
                </div>
                
            </div>
            <div nz-col nzSpan="24">
                <nz-form-label [nzSpan]="3">备注</nz-form-label>
                <nz-form-control [nzSpan]="21">
                    <span>{{ViewData.remarks}}</span>
                   
                </nz-form-control>
            </div>
            <!-- <div nz-col nzSpan="24" class="hrDiv">
                <div nz-col nzSpan="8">
                    <nz-form-item nz-row class="register-area">
                        <nz-form-label [nzSpan]="9">是否批次</nz-form-label>
                        <nz-form-control [nzSpan]="12">
                            <span>{{ViewData.isBatch?'是':'否'}}</span>
                        </nz-form-control>
                    </nz-form-item>
                </div>
                <div nz-col nzSpan="8">
                    <nz-form-item>
                        <nz-form-label [nzSpan]="9">是否检验</nz-form-label>
                        <nz-form-control [nzSpan]="12">
                            <span>{{ViewData.isCheck?'是':'否'}}</span>
                        </nz-form-control>
                    </nz-form-item>
                </div>
                <div nz-col nzSpan="8">
                    <nz-form-item>
                        <nz-form-label [nzSpan]="10">是否抽秤</nz-form-label>
                        <nz-form-control [nzSpan]="12">
                            <span>{{ViewData.isWeight?'是':'否'}}</span>
                        </nz-form-control>
                    </nz-form-item>
                </div>
            </div>

            <div nz-col nzSpan="24" class="hrDiv">
                <div nz-col nzSpan="8">
                    <nz-form-item>
                        <nz-form-label [nzSpan]="9">检验天数</nz-form-label>
                        <nz-form-control [nzSpan]="12">
                            <span>{{ViewData.checkDays}}</span>
                        </nz-form-control>
                    </nz-form-item>
                </div>
                <div nz-col nzSpan="8">
                    <nz-form-item>
                        <nz-form-label [nzSpan]="10">抽秤比率</nz-form-label>
                        <nz-form-control [nzSpan]="12">
                            <span>{{ViewData.weightRate}}%</span>
                        </nz-form-control>
                    </nz-form-item>
                </div>
                <div nz-col nzSpan="8">
                    <nz-form-item>
                        <nz-form-label [nzSpan]="10">ABC分类</nz-form-label>
                        <nz-form-control [nzSpan]="12">
                            <span>{{ViewData.abc}}</span>
                        </nz-form-control>
                    </nz-form-item>
                </div>
            </div> -->
            <div class="clear"></div>
            <div nz-row class="tab-height">
                <nz-tabset>
                    <nz-tab nzTitle="原料属性">
                        <div nz-col nzSpan="24" class="hrDiv">
                            <div nz-col nzSpan="8">
                                <nz-form-item nz-row class="register-area">
                                    <nz-form-label [nzSpan]="9">是否批次</nz-form-label>
                                    <nz-form-control [nzSpan]="12">
                                        <span>{{ViewData.isBatch?'是':'否'}}</span>
                                    </nz-form-control>
                                </nz-form-item>
                            </div>
                            <div nz-col nzSpan="8">
                                <nz-form-item>
                                    <nz-form-label [nzSpan]="10">是否检验</nz-form-label>
                                    <nz-form-control [nzSpan]="12">
                                        <span>{{ViewData.isCheck?'是':'否'}}</span>
                                    </nz-form-control>
                                </nz-form-item>
                            </div>
                            <div nz-col nzSpan="8">
                                <nz-form-item>
                                    <nz-form-label [nzSpan]="10">是否抽秤</nz-form-label>
                                    <nz-form-control [nzSpan]="12">
                                        <span>{{ViewData.isWeight?'是':'否'}}</span>
                                    </nz-form-control>
                                </nz-form-item>
                            </div>
                        </div>
                        <div nz-col nzSpan="24" style="margin-bottom:20px">
                            <div nz-col nzSpan="8">
                                <nz-form-item>
                                    <nz-form-label [nzSpan]="9" [nzRequired]="subSavementForm.get('isCheck')?.value">检验天数
                                    </nz-form-label>
                                    <nz-form-control [nzSpan]="12" nzErrorTip="请输入检验天数">
                                        <span>{{ViewData.checkDays}}</span>
                                    </nz-form-control>
                                </nz-form-item>
                            </div>
                            <div nz-col nzSpan="8">
                                <nz-form-item>
                                    <nz-form-label [nzSpan]="10" [nzRequired]="subSavementForm.get('isWeight')?.value">抽秤比率
                                    </nz-form-label>
                                    <nz-form-control [nzSpan]="12" nzErrorTip="请输入抽秤比率">
                                        <span>{{ViewData.weightRate}}%</span>
                                    </nz-form-control>
                                </nz-form-item>
                            </div>
                            <div nz-col nzSpan="8">
                                <nz-form-item>
                                    <nz-form-label [nzSpan]="10" >ABC分类</nz-form-label>
                                    <nz-form-control [nzSpan]="12" nzErrorTip="ABC分类">
                                        <span>{{ViewData.abc}}</span>
                                    </nz-form-control>
                                </nz-form-item>
                            </div>
                        </div>
                    </nz-tab>
                    <nz-tab nzTitle="产品属性">
                        <div id="region">
                            <div nz-col nzSpan="24">
                                <div nz-col nzSpan="8">
                                    <nz-form-item>
                                        <nz-form-label [nzSpan]="9">色序号</nz-form-label>
                                        <nz-form-control [nzSpan]="12" nzErrorTip="请输入色序号">
                                            <span>{{ViewData.csn}}</span>
                                        </nz-form-control>
                                    </nz-form-item>
                                </div>
                              
                                <div nz-col nzSpan="8">
                                    <nz-form-item>
                                        <nz-form-label [nzSpan]="10">产品标准代号</nz-form-label>
                                        <nz-form-control [nzSpan]="12">
                                            <span>{{ViewData.psc}}</span>
                                        </nz-form-control>
                                    </nz-form-item>
                                </div>
                            </div>
                        </div>
                        
                    </nz-tab>
                </nz-tabset>
            </div>
            <!-- <div id="region">
                <div nz-col nzSpan="24" class="hrDiv">
                    <div nz-col nzSpan="8">
                        <nz-form-item>
                            <nz-form-label [nzSpan]="9">桶编码</nz-form-label>
                            <nz-form-control [nzSpan]="12">
                                <span>{{ViewData.bucketCode}}</span>
                            </nz-form-control>
                        </nz-form-item>
                    </div>
                    <div nz-col nzSpan="8">
                        <nz-form-item>
                            <nz-form-label [nzSpan]="10">桶名称</nz-form-label>
                            <nz-form-control [nzSpan]="12">
                                <span>{{ViewData.bucketName}}</span>
                            </nz-form-control>
                        </nz-form-item>
                    </div>
                    <div nz-col nzSpan="8">
                        <nz-form-item>
                            <nz-form-label [nzSpan]="10">墨签编码</nz-form-label>
                            <nz-form-control [nzSpan]="12">
                                <span>{{ViewData.inkMarkCode}}</span>
                            </nz-form-control>
                        </nz-form-item>
                    </div>
                </div>

                <div nz-col nzSpan="24" class="hrDiv">
                    <div nz-col nzSpan="8">
                        <nz-form-item>
                            <nz-form-label [nzSpan]="9">墨签名称</nz-form-label>
                            <nz-form-control [nzSpan]="12">
                                <span>{{ViewData.inkMarkName}}</span>
                            </nz-form-control>
                        </nz-form-item>
                    </div>
                    <div nz-col nzSpan="8">
                        <nz-form-item>
                            <nz-form-label [nzSpan]="10">盖纸编码</nz-form-label>
                            <nz-form-control [nzSpan]="12">
                                <span>{{ViewData.coverPaperCode}}</span>
                            </nz-form-control>
                        </nz-form-item>
                    </div>
                    <div nz-col nzSpan="8">
                        <nz-form-item>
                            <nz-form-label [nzSpan]="10">盖纸名称</nz-form-label>
                            <nz-form-control [nzSpan]="12">
                                <span>{{ViewData.coverPaperName}}</span>
                            </nz-form-control>
                        </nz-form-item>
                    </div>
                </div>

                <div nz-col nzSpan="24" class="hrDiv">
                    <div nz-col nzSpan="8">
                        <nz-form-item>
                            <nz-form-label [nzSpan]="9">色序号</nz-form-label>
                            <nz-form-control [nzSpan]="12">
                                <span>{{ViewData.csn}}</span>
                            </nz-form-control>
                        </nz-form-item>
                    </div>
                  
                    <div nz-col nzSpan="8">
                        <nz-form-item>
                            <nz-form-label [nzSpan]="10">产品标准代号</nz-form-label>
                            <nz-form-control [nzSpan]="12">
                                <span>{{ViewData.psc}}</span>
                            </nz-form-control>
                        </nz-form-item>
                    </div>
                </div>
            </div> -->
           
        </div>
        <div nz-row class="custome_modal_footer">
            <div nz-col nzSpan="24" style="text-align: right;">
                <button nz-button type="button" nzType="default" (click)="ViewCancel()">取消</button>
            </div>
        </div>
    </form>
</nz-modal>